Here is my code, all objects in both windows are derived from same base class with set tracking area , but I think this issue is not related to tracking area because one of the object always worked, mouseEntered was called on working item and another didn't. The mouse move event just captured by one window and didn't dispatch to another window when leaving current window's area.
private func setupTrackingArea() {
trackingArea = NSTrackingArea.init(rect: bounds, options: [.mouseEnteredAndExited, .activeAlways, .inVisibleRect], owner: self, userInfo: nil)
addTrackingArea(trackingArea)
}
override func mouseEntered(with event: NSEvent) {
isHovered = true
}
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: